<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>	
	<h3>Novo Questionário</h3>
				
	<spring:url var="url" value="/questionarios/novo" />
	<form:form action="${url}" method="post" modelAttribute="questionario">
		<table>
			<tr>
				<td><label for="descricao">Descrição:</label></td>
				<td><input id="descricao" name="descricao" type="text" /></td>
			</tr>
			<tr>		
				<td><label for="tipo_questionario">Tipo:</label></td>
				<td>
					<select id="tipo_questionario" name="tipoQuestionario">
					    <option></option>
						<c:forEach var="tipoQuestionario" items="${tiposQuestionario}">
							<option value="${tipoQuestionario}">${tipoQuestionario}</option>
						</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<td><label for="data_inicio">Data Início:</label></td>
				<td><input type="text" id="data_inicio" name="dataInicio" /></td>
			</tr>
			<tr>
				<td><label for="data_fim">Data Fim:</label></td>
				<td><input type="text" id="data_fim" name="dataFim" /></td>
			</tr>
			<tr>
				<td align="right" colspan="2">
					<input type="button" value="Voltar" onclick="window.location = '<spring:url value="/questionarios" />'" />
					<input type="submit" value="Cadastrar" />
				</td>
			</tr>
		</table>
	</form:form>
</body>
</html>